package remove.middle.man;

/**
 * Created by Administrator on 2018/1/25.
 */
public class Person {

    Department department;

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

//    public String getManager() {
//        return department.getManager();
//    }

    // 如果大量函数都这么做hide delegate的话，我们就应该移出中间人
// 和hide delegate正好相反
    public void test() {
        Person join = new Person();
//        join.getManager();
        join.getDepartment().getManager();
    }
}
